<template>
  <div>
    <template v-for="item in menuList">
      <el-submenu 
      :disabled="item.disabled" 
      :index="item.id+''" 
      :key="item.id+''" 
      v-if="item.children.length>0"
    
      >
        <template slot="title">
          <i :class="item.icon"></i>
          <span>{{item.menuName}}</span>
        </template>
        <menu-tree :menuList="item.children"></menu-tree>
      </el-submenu>
        <el-menu-item 
        :route="item.url+''" 
        :disabled="item.disabled" 
        :index="item.url+''" 
        :key="item.id+''" 
        v-else 
        
        >
           <i :class="item.icon"></i>
          <span>{{item.menuName}}</span>
        </el-menu-item>
    </template>
    
  </div>
</template>

<script>
export default {
    name:'MenuTree',
    props:['menuList'],
    data() {
        return {
           
        }
    },methods: {
      
    },
};
</script>

<style>
</style>